package es.onlysolutions.gs.web.validator;

import es.onlysolutions.gs.web.commandBean.CheckVideoStateBean;
import es.onlysolutions.arq.core.mvc.command.AbstractCommandBean;
import org.springframework.validation.Errors;

/**
 * Validator for the check state controller.
 */
public class CheckVideoStateValidator extends GSValidator
{

    public boolean supports(Class aClass)
    {
        return CheckVideoStateBean.class == aClass;
    }

    protected void validateForm(AbstractCommandBean command, Errors errors)
    {
        boolean youTubeUsername = rejectIfEmptyOrWhitespace(errors, "youTubeUsername", "fieldRequired",
                new String[]{"You Tube Usernamey"}, "The field {0} is required");

        boolean youTubePassw = rejectIfEmptyOrWhitespace(errors, "youTubePassword", "fieldRequired",
                new String[]{"You Tube Password"}, "The field {0} is required");

    }
}
